<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Share Arukas.io Shadowsocks OR Shadowsocksr.">
    <meta name="keywords" content=" Free Shadowsocks,Free Shadowsocksr,Arukas API,Arukas SS" />
    <title>Arukas Share Shadowsocks(R)</title>
    <link rel="stylesheet" href="https://fonts.lug.ustc.edu.cn/css?family=Raleway:200">
    <link href="//cdn.bootcss.com/pure/0.6.0/pure-min.css" rel="stylesheet" />
	<link href="css.css" rel="stylesheet" />
	
</head>
<body>
    <div id="main">
        <div class="header">
            <h2>Arukas Share Shadowsocks(R)</h2>
        </div>
        <div class="content">
            <p><small>
                以下IP和PORT会不定期变化！请注意更新。点击【点击查看配置】可获取单个节点的详细信息。
                <form class="pure-form">
                    <label for="name">SSR订阅服务器地址,相关介绍: <a href="http://51.ruyo.net/p/4217.html">http://51.ruyo.net/p/4217.html</a></label>
                    <input id='txt_ssrsub' class="pure-input-1" type="text" value='' onfocus="this.select();">
                </form>
            </p>
            <div class="pure-form pure-form-stacked">
                <% for(var i=0;i < data.length; i++) { %>
                <fieldset>
                    <legend><b> SS(R)账号信息 ↓↓: <a href="<%=data[i].appid%>">点击查看配置</a></b></legend>
					<div class="pure-g">
						<div class="pure-u-1 u-sm-1-2">
                        <textarea style='width:95%;height:230px;color:blue'><%=JSON.stringify(data[i]).replace(/"appid":"[^"]+",/,'').replace(/,/g,'\r\n').replace('{','{\r\n').replace('}','\r\n}')%></textarea>
                        <textarea style='width:95%;height:110px;color:blue' name="link_<%=data[i].appid%>"></textarea>
                        
                        </div>

						<div class="pure-u-1 u-sm-1-2">
                        <% if(data[i].protocol && data[i].obfs){%>
                        <div class="ssr_qr" id="<%=data[i].appid%>" val='<%=data[i].server + ":" + data[i].server_port +":" + data[i].protocol+ ":"+data[i].method +":"+data[i].obfs+ ":"%>' pwd='<%=data[i].password%>'  style="width:350px; height:350px;"></div>
                        <%}else{%>
                        <div class="ss_qr" id="<%=data[i].appid%>"  val='<%=data[i].method + ":" + data[i].password + "@" + data[i].server + ":" + data[i].server_port%>' style="width:350px; height:350px;"></div>
                        <%}%>
                        </div>
                    </div>                    
				</fieldset>
                <% } %>
			</div>
                 
        </div>
        <div class="footer">
            <div class="legal pure-g">
                <div class="pure-u-1 u-sm-1-2">
                    <p class="legal-license">
                        技术支持: <a href="http://51.ruyo.net">如有乐享</a>
						开源地址: <a href="https://github.com/malaohu/Arukas-API">Github</a>
                        <br>
                        有任何问题请 <a href="https://github.com/malaohu/Arukas-API/issues">提交ISSUES</a>
                    </p>
                </div>
				<div class="pure-u-1 u-sm-1-2">
                    <p class="legal-copyright">
					
                        This site is built with <3 using Pure v0.6.0
						<br>
                        © 2017 RUYO.net! Inc. All rights reserved.
                    </p>
                </div>
            </div>

        </div>
    </div>
	<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
    <script src="//cdn.bootcss.com/Base64/1.0.0/base64.min.js"></script>
	<script>
	$(function(){
        $('#txt_ssrsub').val(window.location.origin + '/ssr/subscribe/10');
        link = '';
		$('.ss_qr').each(function(i,obj){
			$(obj).empty();
            link = "ss://" + btoa($(obj).attr('val'));
            $(obj).qrcode({ width: 350, height: 350, text: link});
            $("textarea[name='link_"+$(obj).attr("id")+"'").text(link);
		});
		$('.ssr_qr').each(function(i,obj){
			$(obj).empty();
            link = "ssr://" + btoa($(obj).attr('val')+btoa($(obj).attr('pwd')));
            $(obj).qrcode({ width: 350, height: 350, text:link});
            $("textarea[name='link_"+$(obj).attr("id")+"'").text(link);
		});
	});
	</script>

</body>
</html>
